#BL1 0XD0020010

TEXT_BASE=0x0

all: BL1.bin

BL1.bin: start.bin
	gcc mkv210_image.c -o mkv210
	./mkv210 start.bin BL1.bin
	
start.bin:
	cp ../start.o ../nand_cp.o ../mmc_cp.o ../uart.o ../memory.o  ./ 
	arm-linux-ld -Ttext ${TEXT_BASE} -o start.elf start.o nand_cp.o uart.o memory.o mmc_cp.o
	arm-linux-objcopy -O binary start.elf start.bin
	arm-linux-objdump -D start.elf > start_elf.dis

	
clean:
	rm *.o *.elf *.bin *.dis mkv210 -f
